SpanRiskCalculator
This table allows custom span risk calculations based on either user or SR supplied input values.
METADATA
Attribute | Value |
---|---|
Topic | 5030-srse-calculators |
MLink Token | SRMLinkAnalytics |
Product | SRAnalytics |
accessType | SELECT,UPDATE,INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
secKey_at | enum - AssetType | PRI | 'None' | |
secKey_ts | enum - TickerSrc | PRI | 'None' | |
secKey_tk | VARCHAR(12) | PRI | '' | |
secKey_yr | SMALLINT UNSIGNED | PRI, SEC | 0 | |
secKey_mn | TINYINT UNSIGNED | PRI, SEC | 0 | |
secKey_dy | TINYINT UNSIGNED | PRI, SEC | 0 | |
secKey_xx | DOUBLE | PRI | 0 | |
secKey_cp | enum - CallPut | PRI | 'Call' | |
secType | enum - SpdrKeyType | PRI | 'None' | |
userName | VARCHAR(24) | PRI | '' | |
vol | DOUBLE | 0 | volatility | |
volSrc | enum - FieldSrc | 'Default' | ||
uPrc | DOUBLE | 0 | underlying price | |
uPrcSrc | enum - FieldSrc | 'Default' | ||
years | DOUBLE | 0 | yearstoexpiration default uses SR volatility time value | |
yearsSrc | enum - FieldSrc | 'Default' | ||
sdiv | DOUBLE | 0 | continuous stock dividend using for pricing | |
sdivSrc | enum - FieldSrc | 'Default' | ||
rate | DOUBLE | 0 | discount rate used for pricing | |
rateSrc | enum - FieldSrc | 'Default' | ||
exType | enum - ExerciseType | 'None' | exercise type of the option American or European | |
exTypeSrc | enum - FieldSrc | 'Default' | ||
effStrike | DOUBLE | 0 | effective strike used for pricing default is okeyStrike | |
effStrikeSrc | enum - FieldSrc | 'Default' | ||
symRatio | DOUBLE | 0 | underlying symbol ratio for nonstandard options discrete dividend will be scaled by this factor | |
symRatioSrc | enum - FieldSrc | 'Default' | ||
divString | TINYTEXT | '' | discrete dividend string yearsToExpiry years1amt1 years2amt2 or 1 date1amt1 date2amt2 | |
divSrc | enum - FieldSrc | 'Default' | ||
modelType | enum - CalcModelType | 'None' | LogNormalExact LogNormalApprox NormalExact NormalApprox | |
modelTypeSrc | enum - FieldSrc | 'Default' | ||
calcPrecision | enum - CalcPrecision | 'Low' | numerical precision of steps if a numerical method is used more steps will be slower to calculate | |
pointValue | DOUBLE | 0 | value of a point in the underlying product | |
pointCurrency | enum - Currency | 'None' | ||
pointValueSrc | enum - FieldSrc | 'Default' | ||
prcSpanUp | FLOAT | 0 | ||
prcSpanDn | FLOAT | 0 | ||
prcSpanType | enum - PrcSpanType | 'Exch' | ||
volSpan | FLOAT | 0 | ||
volSpanType | enum - VolSpanType | 'Exch' | ||
spanCalcType | enum - SpanCalcType | 'PnL' | ||
hedgeDeltaNeutral | enum - YesNo | 'No' | all option will be assumed hedged delta neutral stock and futures will not have slide values | |
adjYears | DOUBLE | -1 | year adjustment effYears years adjYears 1 no limit | |
maxYears | DOUBLE | -1 | upper bound for years effYears MINmaxYears effYears 1 no limit | |
span01 | FLOAT | 0 | span1 uPrcunch volup | |
span02 | FLOAT | 0 | span2 uPrcunch voldown | |
span03 | FLOAT | 0 | span3 uPrc33 volup | |
span04 | FLOAT | 0 | span4 uPrc33 voldn | |
span05 | FLOAT | 0 | span5 uPrc33 volup | |
span06 | FLOAT | 0 | span6 uPrc33 voldown | |
span07 | FLOAT | 0 | span7 uPrc67 volup | |
span08 | FLOAT | 0 | span8 uPrc67 voldown | |
span09 | FLOAT | 0 | span9 uPrc67 volup | |
span10 | FLOAT | 0 | span10 uPrc67 voldown | |
span11 | FLOAT | 0 | span11 uPrc100 volup | |
span12 | FLOAT | 0 | span12 uPrc100 voldown | |
span13 | FLOAT | 0 | span13 uPrc100 volup | |
span14 | FLOAT | 0 | span14 uPrc100 voldown | |
span15 | FLOAT | 0 | span15 uPrc300 price slide 033 | |
span16 | FLOAT | 0 | span16 uPrc300 price slide 033 | |
error | VARCHAR(32) | '' | calculation error | |
timestamp | DATETIME(6) | '2000-01-01' |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
secKey_tk | 1 |
secKey_yr | 2 |
secKey_mn | 3 |
secKey_dy | 4 |
secKey_xx | 5 |
secKey_cp | 6 |
secKey_at | 7 |
secKey_ts | 8 |
secType | 9 |
userName | 10 |
SECONDARY INDEX (ExpirationIndex) (Not Unique)
Field | Sequence |
---|---|
secKey_yr | 1 |
secKey_mn | 2 |
secKey_dy | 3 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRAnalytics`.`MsgSpanRiskCalculator` (
`secKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`secKey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`secKey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`secKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`secKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`secKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`secKey_xx` DOUBLE NOT NULL DEFAULT 0,
`secKey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call',
`secType` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None',
`userName` VARCHAR(24) NOT NULL DEFAULT '',
`vol` DOUBLE NOT NULL DEFAULT 0 COMMENT 'volatility',
`volSrc` ENUM('Default','User') NOT NULL DEFAULT 'Default',
`uPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'underlying price',
`uPrcSrc` ENUM('Default','User') NOT NULL DEFAULT 'Default',
`years` DOUBLE NOT NULL DEFAULT 0 COMMENT 'years-to-expiration (default uses SR volatility time value)',
`yearsSrc` ENUM('Default','User') NOT NULL DEFAULT 'Default',
`sdiv` DOUBLE NOT NULL DEFAULT 0 COMMENT 'continuous stock dividend using for pricing',
`sdivSrc` ENUM('Default','User') NOT NULL DEFAULT 'Default',
`rate` DOUBLE NOT NULL DEFAULT 0 COMMENT 'discount rate used for pricing',
`rateSrc` ENUM('Default','User') NOT NULL DEFAULT 'Default',
`exType` ENUM('None','American','European','Asian','Cliquet') NOT NULL DEFAULT 'None' COMMENT 'exercise type of the option (American or European)',
`exTypeSrc` ENUM('Default','User') NOT NULL DEFAULT 'Default',
`effStrike` DOUBLE NOT NULL DEFAULT 0 COMMENT 'effective strike used for pricing (default is okey.Strike)',
`effStrikeSrc` ENUM('Default','User') NOT NULL DEFAULT 'Default',
`symRatio` DOUBLE NOT NULL DEFAULT 0 COMMENT 'underlying symbol ratio (for non-standard options); discrete dividend will be scaled by this factor',
`symRatioSrc` ENUM('Default','User') NOT NULL DEFAULT 'Default',
`divString` TINYTEXT NOT NULL DEFAULT '' COMMENT 'discrete dividend string [ yearsToExpiry, years1:amt1, years2:amt2, ...] or [ -1, date1:amt1, date2:amt2, ... ]',
`divSrc` ENUM('Default','User') NOT NULL DEFAULT 'Default',
`modelType` ENUM('None','LogNormalExact','NormalExact','LogNormalApprox','NormalApprox') NOT NULL DEFAULT 'None' COMMENT 'LogNormalExact, LogNormalApprox, NormalExact, NormalApprox',
`modelTypeSrc` ENUM('Default','User') NOT NULL DEFAULT 'Default',
`calcPrecision` ENUM('None','Low','Normal','High','Custom') NOT NULL DEFAULT 'Low' COMMENT 'numerical precision (# of steps) if a numerical method is used; [more steps will be slower to calculate]',
`pointValue` DOUBLE NOT NULL DEFAULT 0 COMMENT '$ value of a point in the underlying product',
`pointCurrency` ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') NOT NULL DEFAULT 'None',
`pointValueSrc` ENUM('Default','User') NOT NULL DEFAULT 'Default',
`prcSpanUp` FLOAT NOT NULL DEFAULT 0,
`prcSpanDn` FLOAT NOT NULL DEFAULT 0,
`prcSpanType` ENUM('None','Pct','Log','Pts','SD1d','Exch') NOT NULL DEFAULT 'Exch',
`volSpan` FLOAT NOT NULL DEFAULT 0,
`volSpanType` ENUM('None','Pct','Log','Pts','Abs','vAnn','Exch') NOT NULL DEFAULT 'Exch',
`spanCalcType` ENUM('PnL','Delta','Vega','WVega','TVega','WtVega','Gamma','Theta') NOT NULL DEFAULT 'PnL',
`hedgeDeltaNeutral` ENUM('None','Yes','No') NOT NULL DEFAULT 'No' COMMENT 'all option will be assumed hedged delta neutral, stock and futures will not have slide values',
`adjYears` DOUBLE NOT NULL DEFAULT -1 COMMENT 'year adjustment: effYears = years + adjYears (-1 = no limit)',
`maxYears` DOUBLE NOT NULL DEFAULT -1 COMMENT 'upper bound for years: effYears = MIN(maxYears, effYears) (-1 = no limit)',
`span01` FLOAT NOT NULL DEFAULT 0 COMMENT 'span1: uPrc=unch, vol=up',
`span02` FLOAT NOT NULL DEFAULT 0 COMMENT 'span2: uPrc=unch, vol=down',
`span03` FLOAT NOT NULL DEFAULT 0 COMMENT 'span3: uPrc=+33%, vol=up',
`span04` FLOAT NOT NULL DEFAULT 0 COMMENT 'span4: uPrc=+33%, vol=dn',
`span05` FLOAT NOT NULL DEFAULT 0 COMMENT 'span5: uPrc=-33%, vol=up',
`span06` FLOAT NOT NULL DEFAULT 0 COMMENT 'span6: uPrc=-33%, vol=down',
`span07` FLOAT NOT NULL DEFAULT 0 COMMENT 'span7: uPrc=+67%, vol=up',
`span08` FLOAT NOT NULL DEFAULT 0 COMMENT 'span8: uPrc=+67%, vol=down',
`span09` FLOAT NOT NULL DEFAULT 0 COMMENT 'span9: uPrc=-67%, vol=up',
`span10` FLOAT NOT NULL DEFAULT 0 COMMENT 'span10: uPrc=-67%, vol=down',
`span11` FLOAT NOT NULL DEFAULT 0 COMMENT 'span11: uPrc=+100%, vol=up',
`span12` FLOAT NOT NULL DEFAULT 0 COMMENT 'span12: uPrc=+100%, vol=down',
`span13` FLOAT NOT NULL DEFAULT 0 COMMENT 'span13: uPrc=-100%, vol=up',
`span14` FLOAT NOT NULL DEFAULT 0 COMMENT 'span14: uPrc=-100%, vol=down',
`span15` FLOAT NOT NULL DEFAULT 0 COMMENT 'span15: uPrc=+300%; price slide * 0.33',
`span16` FLOAT NOT NULL DEFAULT 0 COMMENT 'span16: uPrc=-300%, price slide * 0.33',
`error` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'calculation error',
`timestamp` DATETIME(6) NOT NULL DEFAULT '2000-01-01',
PRIMARY KEY USING HASH (`secKey_tk`,`secKey_yr`,`secKey_mn`,`secKey_dy`,`secKey_xx`,`secKey_cp`,`secKey_at`,`secKey_ts`,`secType`,`userName`),
KEY `ExpirationIndex` (`secKey_yr`,`secKey_mn`,`secKey_dy`) USING HASH
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='This table allows custom span risk calculations based on either user or SR supplied input values.';
SELECT TABLE EXAMPLE QUERY
SELECT
`secKey_at`,
`secKey_ts`,
`secKey_tk`,
`secKey_yr`,
`secKey_mn`,
`secKey_dy`,
`secKey_xx`,
`secKey_cp`,
`secType`,
`userName`,
`vol`,
`volSrc`,
`uPrc`,
`uPrcSrc`,
`years`,
`yearsSrc`,
`sdiv`,
`sdivSrc`,
`rate`,
`rateSrc`,
`exType`,
`exTypeSrc`,
`effStrike`,
`effStrikeSrc`,
`symRatio`,
`symRatioSrc`,
`divString`,
`divSrc`,
`modelType`,
`modelTypeSrc`,
`calcPrecision`,
`pointValue`,
`pointCurrency`,
`pointValueSrc`,
`prcSpanUp`,
`prcSpanDn`,
`prcSpanType`,
`volSpan`,
`volSpanType`,
`spanCalcType`,
`hedgeDeltaNeutral`,
`adjYears`,
`maxYears`,
`span01`,
`span02`,
`span03`,
`span04`,
`span05`,
`span06`,
`span07`,
`span08`,
`span09`,
`span10`,
`span11`,
`span12`,
`span13`,
`span14`,
`span15`,
`span16`,
`error`,
`timestamp`
FROM `SRAnalytics`.`MsgSpanRiskCalculator`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`secKey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`secKey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`secKey_tk` = 'Example_secKey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`secKey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`secKey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`secKey_dy` = 1
AND
/* Replace with a DOUBLE */
`secKey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`secKey_cp` = 'Call'
AND
/* Replace with a ENUM('None','Stock','Future','Option','MLeg') */
`secType` = 'None'
AND
/* Replace with a VARCHAR(24) */
`userName` = 'Example_userName';
UPDATE TABLE EXAMPLE QUERY
UPDATE `SRAnalytics`.`MsgSpanRiskCalculator`
SET
/* Replace with a DOUBLE */
`vol` = 4.56,
/* Replace with a ENUM('Default','User') */
`volSrc` = 'Default',
/* Replace with a DOUBLE */
`uPrc` = 4.56,
/* Replace with a ENUM('Default','User') */
`uPrcSrc` = 'Default',
/* Replace with a DOUBLE */
`years` = 4.56,
/* Replace with a ENUM('Default','User') */
`yearsSrc` = 'Default',
/* Replace with a DOUBLE */
`sdiv` = 4.56,
/* Replace with a ENUM('Default','User') */
`sdivSrc` = 'Default',
/* Replace with a DOUBLE */
`rate` = 4.56,
/* Replace with a ENUM('Default','User') */
`rateSrc` = 'Default',
/* Replace with a ENUM('None','American','European','Asian','Cliquet') */
`exType` = 'None',
/* Replace with a ENUM('Default','User') */
`exTypeSrc` = 'Default',
/* Replace with a DOUBLE */
`effStrike` = 4.56,
/* Replace with a ENUM('Default','User') */
`effStrikeSrc` = 'Default',
/* Replace with a DOUBLE */
`symRatio` = 4.56,
/* Replace with a ENUM('Default','User') */
`symRatioSrc` = 'Default',
/* Replace with a TINYTEXT */
`divString` = 'dummy tiny text',
/* Replace with a ENUM('Default','User') */
`divSrc` = 'Default',
/* Replace with a ENUM('None','LogNormalExact','NormalExact','LogNormalApprox','NormalApprox') */
`modelType` = 'None',
/* Replace with a ENUM('Default','User') */
`modelTypeSrc` = 'Default',
/* Replace with a ENUM('None','Low','Normal','High','Custom') */
`calcPrecision` = 'Low',
/* Replace with a DOUBLE */
`pointValue` = 4.56,
/* Replace with a ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') */
`pointCurrency` = 'None',
/* Replace with a ENUM('Default','User') */
`pointValueSrc` = 'Default',
/* Replace with a FLOAT */
`prcSpanUp` = 1.23,
/* Replace with a FLOAT */
`prcSpanDn` = 1.23,
/* Replace with a ENUM('None','Pct','Log','Pts','SD1d','Exch') */
`prcSpanType` = 'Exch',
/* Replace with a FLOAT */
`volSpan` = 1.23,
/* Replace with a ENUM('None','Pct','Log','Pts','Abs','vAnn','Exch') */
`volSpanType` = 'Exch',
/* Replace with a ENUM('PnL','Delta','Vega','WVega','TVega','WtVega','Gamma','Theta') */
`spanCalcType` = 'PnL',
/* Replace with a ENUM('None','Yes','No') */
`hedgeDeltaNeutral` = 'No',
/* Replace with a DOUBLE */
`adjYears` = 4.56,
/* Replace with a DOUBLE */
`maxYears` = 4.56,
/* Replace with a FLOAT */
`span01` = 1.23,
/* Replace with a FLOAT */
`span02` = 1.23,
/* Replace with a FLOAT */
`span03` = 1.23,
/* Replace with a FLOAT */
`span04` = 1.23,
/* Replace with a FLOAT */
`span05` = 1.23,
/* Replace with a FLOAT */
`span06` = 1.23,
/* Replace with a FLOAT */
`span07` = 1.23,
/* Replace with a FLOAT */
`span08` = 1.23,
/* Replace with a FLOAT */
`span09` = 1.23,
/* Replace with a FLOAT */
`span10` = 1.23,
/* Replace with a FLOAT */
`span11` = 1.23,
/* Replace with a FLOAT */
`span12` = 1.23,
/* Replace with a FLOAT */
`span13` = 1.23,
/* Replace with a FLOAT */
`span14` = 1.23,
/* Replace with a FLOAT */
`span15` = 1.23,
/* Replace with a FLOAT */
`span16` = 1.23,
/* Replace with a VARCHAR(32) */
`error` = 'Example_error',
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000'
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`secKey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`secKey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`secKey_tk` = 'Example_secKey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`secKey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`secKey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`secKey_dy` = 1
AND
/* Replace with a DOUBLE */
`secKey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`secKey_cp` = 'Call'
AND
/* Replace with a ENUM('None','Stock','Future','Option','MLeg') */
`secType` = 'None'
AND
/* Replace with a VARCHAR(24) */
`userName` = 'Example_userName';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRAnalytics`.`MsgSpanRiskCalculator`(
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`secKey_at`,
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`secKey_ts`,
/* Replace with a VARCHAR(12) */
`secKey_tk`,
/* Replace with a SMALLINT UNSIGNED */
`secKey_yr`,
/* Replace with a TINYINT UNSIGNED */
`secKey_mn`,
/* Replace with a TINYINT UNSIGNED */
`secKey_dy`,
/* Replace with a DOUBLE */
`secKey_xx`,
/* Replace with a ENUM('Call','Put','Pair') */
`secKey_cp`,
/* Replace with a ENUM('None','Stock','Future','Option','MLeg') */
`secType`,
/* Replace with a VARCHAR(24) */
`userName`,
/* Replace with a DOUBLE */
`vol`,
/* Replace with a ENUM('Default','User') */
`volSrc`,
/* Replace with a DOUBLE */
`uPrc`,
/* Replace with a ENUM('Default','User') */
`uPrcSrc`,
/* Replace with a DOUBLE */
`years`,
/* Replace with a ENUM('Default','User') */
`yearsSrc`,
/* Replace with a DOUBLE */
`sdiv`,
/* Replace with a ENUM('Default','User') */
`sdivSrc`,
/* Replace with a DOUBLE */
`rate`,
/* Replace with a ENUM('Default','User') */
`rateSrc`,
/* Replace with a ENUM('None','American','European','Asian','Cliquet') */
`exType`,
/* Replace with a ENUM('Default','User') */
`exTypeSrc`,
/* Replace with a DOUBLE */
`effStrike`,
/* Replace with a ENUM('Default','User') */
`effStrikeSrc`,
/* Replace with a DOUBLE */
`symRatio`,
/* Replace with a ENUM('Default','User') */
`symRatioSrc`,
/* Replace with a TINYTEXT */
`divString`,
/* Replace with a ENUM('Default','User') */
`divSrc`,
/* Replace with a ENUM('None','LogNormalExact','NormalExact','LogNormalApprox','NormalApprox') */
`modelType`,
/* Replace with a ENUM('Default','User') */
`modelTypeSrc`,
/* Replace with a ENUM('None','Low','Normal','High','Custom') */
`calcPrecision`,
/* Replace with a DOUBLE */
`pointValue`,
/* Replace with a ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') */
`pointCurrency`,
/* Replace with a ENUM('Default','User') */
`pointValueSrc`,
/* Replace with a FLOAT */
`prcSpanUp`,
/* Replace with a FLOAT */
`prcSpanDn`,
/* Replace with a ENUM('None','Pct','Log','Pts','SD1d','Exch') */
`prcSpanType`,
/* Replace with a FLOAT */
`volSpan`,
/* Replace with a ENUM('None','Pct','Log','Pts','Abs','vAnn','Exch') */
`volSpanType`,
/* Replace with a ENUM('PnL','Delta','Vega','WVega','TVega','WtVega','Gamma','Theta') */
`spanCalcType`,
/* Replace with a ENUM('None','Yes','No') */
`hedgeDeltaNeutral`,
/* Replace with a DOUBLE */
`adjYears`,
/* Replace with a DOUBLE */
`maxYears`,
/* Replace with a FLOAT */
`span01`,
/* Replace with a FLOAT */
`span02`,
/* Replace with a FLOAT */
`span03`,
/* Replace with a FLOAT */
`span04`,
/* Replace with a FLOAT */
`span05`,
/* Replace with a FLOAT */
`span06`,
/* Replace with a FLOAT */
`span07`,
/* Replace with a FLOAT */
`span08`,
/* Replace with a FLOAT */
`span09`,
/* Replace with a FLOAT */
`span10`,
/* Replace with a FLOAT */
`span11`,
/* Replace with a FLOAT */
`span12`,
/* Replace with a FLOAT */
`span13`,
/* Replace with a FLOAT */
`span14`,
/* Replace with a FLOAT */
`span15`,
/* Replace with a FLOAT */
`span16`,
/* Replace with a VARCHAR(32) */
`error`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'None',
'None',
'Example_secKey_tk',
123,
1,
1,
4.56,
'Call',
'None',
'Example_userName',
4.56,
'Default',
4.56,
'Default',
4.56,
'Default',
4.56,
'Default',
4.56,
'Default',
'None',
'Default',
4.56,
'Default',
4.56,
'Default',
'dummy tiny text',
'Default',
'None',
'Default',
'Low',
4.56,
'None',
'Default',
1.23,
1.23,
'Exch',
1.23,
'Exch',
'PnL',
'No',
4.56,
4.56,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
'Example_error',
'2022-01-01 12:34:56.000000'
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRAnalytics`.`MsgSpanRiskCalculator`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`secKey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`secKey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`secKey_tk` = 'Example_secKey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`secKey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`secKey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`secKey_dy` = 1
AND
/* Replace with a DOUBLE */
`secKey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`secKey_cp` = 'Call'
AND
/* Replace with a ENUM('None','Stock','Future','Option','MLeg') */
`secType` = 'None'
AND
/* Replace with a VARCHAR(24) */
`userName` = 'Example_userName';
Doc Columns Query
SELECT * FROM SRAnalytics.doccolumns WHERE TABLE_NAME='SpanRiskCalculator' ORDER BY ordinal_position ASC;